package cn.fl.expatriate.service.impl;

import java.util.List;

import cn.fl.expatriate.api.IAdvLimChgRecApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.fl.expatriate.dto.AdvLimChgRecDTO;
import cn.fl.expatriate.service.IAdvLimChgRecService;
import cn.fl.expatriate.transform.AdvLimChgRecVOTransform;
import cn.fl.expatriate.vo.AdvLimChgRecVO;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;

/**
 * @Description: 垫款额度变更记录表 客户端服务层接口实现
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class AdvLimChgRecServiceImpl implements IAdvLimChgRecService {

	/**
	 * 垫款额度变更记录表 对外暴露接口
	 */
	@Autowired
	private IAdvLimChgRecApiService advLimChgRecApiService;

	@Override
	public AdvLimChgRecVO selectById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.newLogger("selectById"+"主键参数不能为空!").info();
			return null;
		}
		//TODO 业务逻辑
		AdvLimChgRecDTO dto = null;//this.自定义ApiService.selectById(id);
		return AdvLimChgRecVOTransform.toVO(dto);
	}

	@Override
	public Long add(AdvLimChgRecVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.newLogger("add"+"新增对象不能为空!").info();
			return null;
		}
		//return this.advLimChgRecApiService.add(AdvLimChgRecVOTransform.toDTO(entity));
		//TODO 业务逻辑
		return null;
	}

	@Override
	public boolean removeById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.newLogger("removeById"+ "删除主键参数不能为空!").info();
			return false;
		}
		//return this.advLimChgRecApiService.removeById(id);
		//TODO 业务逻辑
		return false;
	}
	
	/**
     * 删除
     * @param ids
     * @return
     */
    @Override
	public boolean removeByIds(List<Long> ids)throws BaseException{
    	if(CollectionUtils.isEmpty(ids)){
    		BaseLogUtils.newLogger("removeByIds"+ "删除主键参数集合不能为空!").info();
			return false;
		};
		return false;
    }

	@Override
	public boolean modify(AdvLimChgRecVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.newLogger("modify"+ "修改对象参数不能为空!").info();
			return false;
		}
		//return this.advLimChgRecApiService.modify(AdvLimChgRecVOTransform.toDTO(entity));
		//TODO 业务逻辑
		return false;
	}

	@Override
	public Pager searchListPage(Pager page) throws BaseException{
		if(null == page){
			page = new Pager();
		}
		//return this.advLimChgRecApiService.searchListPage(page);
		//TODO 业务逻辑
		return null;
	}
}
